package com.example.myapplication;

import androidx.appcompat.app.AppCompatActivity;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class MenuActivity extends AppCompatActivity implements View.OnClickListener{

    private Button mTvBtn, mEtBtn, mBtn, mIvBtn, mPbBtn, mNtBtn, mTbBtn, mLvBtn, mRvBtn, mFABtn,
            mTABtn, mAABtn, mVpBtn, mOkHttpBtn, mRxjavaBtn;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_menu);

        mTvBtn = findViewById(R.id.tvBtn);
        mEtBtn = findViewById(R.id.etBtn);
        mBtn = findViewById(R.id.btnBtn);
        mIvBtn = findViewById(R.id.ivBtn);
        mPbBtn = findViewById(R.id.pbBtn);
        mNtBtn = findViewById(R.id.notificationBtn);
        mTbBtn = findViewById(R.id.toolbarBtn);
        mLvBtn = findViewById(R.id.listViewBtn);
        mRvBtn = findViewById(R.id.recyclerViewBtn);
        mFABtn = findViewById(R.id.frameAnimBtn);
        mTABtn = findViewById(R.id.tweenAnimBtn);
        mAABtn = findViewById(R.id.attributeAnimBtn);
        mVpBtn = findViewById(R.id.viewPagerBtn);
        mOkHttpBtn = findViewById(R.id.okHttpBtn);
        mRxjavaBtn = findViewById(R.id.RxjavaBtn);
        mTvBtn.setOnClickListener(this);
        mEtBtn.setOnClickListener(this);
        mBtn.setOnClickListener(this);
        mIvBtn.setOnClickListener(this);
        mPbBtn.setOnClickListener(this);
        mNtBtn.setOnClickListener(this);
        mTbBtn.setOnClickListener(this);
        mLvBtn.setOnClickListener(this);
        mRvBtn.setOnClickListener(this);
        mFABtn.setOnClickListener(this);
        mTABtn.setOnClickListener(this);
        mAABtn.setOnClickListener(this);
        mVpBtn.setOnClickListener(this);
        mOkHttpBtn.setOnClickListener(this);
        mRxjavaBtn.setOnClickListener(this);
    }

    @SuppressLint("NonConstantResourceId")
    @Override
    public void onClick(View v) {
        switch(v.getId()){
            case R.id.tvBtn:
                Intent intent1 = new Intent(MenuActivity.this, MainActivity.class);
                startActivity(intent1);
                break;
            case R.id.etBtn:
                Intent intent2 = new Intent(MenuActivity.this, MainActivity2.class);
                startActivity(intent2);
                break;
            case R.id.btnBtn:
                Intent intent3 = new Intent(MenuActivity.this, MainActivity3.class);
                startActivity(intent3);
                break;
            case R.id.ivBtn:
                Intent intent4 = new Intent(MenuActivity.this, MainActivity4.class);
                startActivity(intent4);
                break;
            case R.id.pbBtn:
                Intent intent5 = new Intent(MenuActivity.this, ProgressBarActivity.class);
                startActivity(intent5);
                break;
            case R.id.notificationBtn:
                Intent intent6 = new Intent(MenuActivity.this, NotificationActivity.class);
                startActivity(intent6);
                break;
            case R.id.toolbarBtn:
                Intent intent7 = new Intent(MenuActivity.this, ToolBarActivity.class);
                startActivity(intent7);
                break;
            case R.id.listViewBtn:
                Intent intent8 = new Intent(MenuActivity.this, ListViewActivity.class);
                startActivity(intent8);
                break;
            case R.id.recyclerViewBtn:
                Intent intent9 = new Intent(MenuActivity.this, RecyclerViewActivity.class);
                startActivity(intent9);
                break;
            case R.id.frameAnimBtn:
                Intent intent10 = new Intent(MenuActivity.this, FrameAnimActivity.class);
                startActivity(intent10);
                break;
            case R.id.tweenAnimBtn:
                Intent intent11 = new Intent(MenuActivity.this, TweenActivity.class);
                startActivity(intent11);
                break;
            case R.id.attributeAnimBtn:
                Intent intent12 = new Intent(MenuActivity.this, AttibuteAnimActivity.class);
                startActivity(intent12);
                break;
            case R.id.viewPagerBtn:
                Intent intent13 = new Intent(MenuActivity.this, ViewPagerActivity.class);
                startActivity(intent13);
                break;
            case R.id.okHttpBtn:
                Intent intent14 = new Intent(MenuActivity.this, OkHttpActivity.class);
                startActivity(intent14);
                break;
            case R.id.RxjavaBtn:
                Intent intent15 = new Intent(MenuActivity.this, RxjavaActivity.class);
                startActivity(intent15);
                break;
        }
    }
}